package com.xnyzc.lhy.order.controller.capi.order;


import com.xnyzc.lhy.common.entity.Rv;
import com.xnyzc.lhy.common.exception.PangException;
import com.xnyzc.lhy.common.penum.EErrorCode;
import com.xnyzc.lhy.common.util.CheckUtil;
import com.xnyzc.lhy.common.util.GpsUtil;
import com.xnyzc.lhy.order.entity.mq.OaCOrderPersonal;
import com.xnyzc.lhy.order.entity.order.OaDOrder;
import com.xnyzc.lhy.order.entity.param.order.ExpectedParam;
import com.xnyzc.lhy.order.entity.param.order.OrderParam;
import com.xnyzc.lhy.order.service.order.IOaDOrderService;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 用户下单控制器 前端控制器
 * </p>
 *
 * @author huxuekuo
 * @since 2019-07-19
 */
@RestController
@RequestMapping("/oa/capi/order")
public class OaCOrderController {


    @Autowired
    private IOaDOrderService service;


    /**
     * 更新用户订单
     *
     * @param oaCOrderPersonal
     * @return
     */
    @PostMapping(value = "/updateUserOrderInfo")
    @ApiOperation(value = "更新用户订单", notes = "更新用户订单")
    public Boolean updateUserOrderInfo(@RequestBody OaCOrderPersonal oaCOrderPersonal){
        return service.updateUserOrderInfo(oaCOrderPersonal);
    }
    /**
     * 上传mongo里点位数据
     *
     * @return
     */
    @PostMapping(value = "/uploadTrackFromMongo")
    public Boolean uploadTrackFromMongo(@RequestBody OaDOrder oaDOrder) {
        return service.uploadTrackFromMongo(oaDOrder);
    }

}
